#include <cstdlib>
#include <pthread.h>
#include "common_thread.h"

void* Thread::starter(void* elemento){
    Thread* thread = (Thread*) elemento;
    thread->ejecutar();
    return NULL;
}

Thread::Thread(){
}

Thread::~Thread(){
}

void Thread::iniciar(){
    pthread_create(&thread, NULL, starter, (void*) this);
}

void Thread::join(){
    pthread_join(thread, NULL);
}
